package com.ruoyi.purchase.service.impl;

import java.util.List;

import com.ruoyi.purchase.mapper.FirmClientMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.domain.FirmClient;
import com.ruoyi.purchase.service.IFirmClientService;

/**
 * 客户Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-16
 */
@Service
public class FirmClientServiceImpl implements IFirmClientService 
{
    @Autowired
    private FirmClientMapper firmClientMapper;

    /**
     * 查询客户
     * 
     * @param id 客户主键
     * @return 客户
     */
    @Override
    public FirmClient selectFirmClientById(Long id)
    {
        return firmClientMapper.selectFirmClientById(id);
    }

    /**
     * 查询客户列表
     * 
     * @param firmClient 客户
     * @return 客户
     */
    @Override
    public List<FirmClient> selectFirmClientList(FirmClient firmClient)
    {
        return firmClientMapper.selectFirmClientList(firmClient);
    }

    /**
     * 新增客户
     * 
     * @param firmClient 客户
     * @return 结果
     */
    @Override
    public int insertFirmClient(FirmClient firmClient)
    {
        return firmClientMapper.insertFirmClient(firmClient);
    }

    /**
     * 修改客户
     * 
     * @param firmClient 客户
     * @return 结果
     */
    @Override
    public int updateFirmClient(FirmClient firmClient)
    {
        return firmClientMapper.updateFirmClient(firmClient);
    }

    /**
     * 批量删除客户
     * 
     * @param ids 需要删除的客户主键
     * @return 结果
     */
    @Override
    public int deleteFirmClientByIds(Long[] ids)
    {
        return firmClientMapper.deleteFirmClientByIds(ids);
    }

    /**
     * 删除客户信息
     * 
     * @param id 客户主键
     * @return 结果
     */
    @Override
    public int deleteFirmClientById(Long id)
    {
        return firmClientMapper.deleteFirmClientById(id);
    }
}
